Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Feature Idea: Can't create newrelic.ini on Windows with Python

feature-idea

#1

The script to generate the newrelic.ini on Windows, as requested to be run by the docs:

newrelic-admin generate-config newrelic.ini

fails on windows because the module pwd doesn’t exist:

Traceback (most recent call last):
  File "C:\Users\pupeno\Documents\Eligible\code\phoenix\venv\Scripts\newrelic-admin-script.py", line 11, in <module>
    load_entry_point('newrelic==4.8.0.110', 'console_scripts', 'newrelic-admin')()
  File "c:\users\pupeno\documents\eligible\code\phoenix\venv\lib\site-packages\setuptools-39.1.0-py3.7.egg\pkg_resources\__init__.py", line 480, in load_entry_point
  File "c:\users\pupeno\documents\eligible\code\phoenix\venv\lib\site-packages\setuptools-39.1.0-py3.7.egg\pkg_resources\__init__.py", line 2691, in load_entry_point
  File "c:\users\pupeno\documents\eligible\code\phoenix\venv\lib\site-packages\setuptools-39.1.0-py3.7.egg\pkg_resources\__init__.py", line 2322, in load
  File "c:\users\pupeno\documents\eligible\code\phoenix\venv\lib\site-packages\setuptools-39.1.0-py3.7.egg\pkg_resources\__init__.py", line 2328, in resolve
  File "c:\users\pupeno\documents\eligible\code\phoenix\venv\lib\site-packages\newrelic\admin\__init__.py", line 143, in <module>
    load_internal_plugins()
  File "c:\users\pupeno\documents\eligible\code\phoenix\venv\lib\site-packages\newrelic\admin\__init__.py", line 108, in load_internal_plugins
    __import__(module_name)
  File "c:\users\pupeno\documents\eligible\code\phoenix\venv\lib\site-packages\newrelic\admin\record_deploy.py", line 3, in <module>
    import pwd
ModuleNotFoundError: No module named 'pwd'

Maybe this can be of some help in finding a solution: https://github.com/gitpython-developers/GitPython/issues/356


  • I want this, too
  • I have more info to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.


#2

@pablo.fernandez1 While some customers may have been able to get the agent working with Windows, the Python agent doesn’t currently officially support Windows environments. You can read more about the Python agent’s compatibility and requirements here:

https://docs.newrelic.com/docs/agents/python-agent/getting-started/compatibility-requirements-python-agent

I’ll make sure to pass along your interest in having Windows support to our Product Developers. We’ll add a poll to your post so others can express their support for having Windows support as well. :slight_smile:


#3

I wasn’t trying to run the agent on windows. My servers are Linux, but I develop on windows. I was trying to generate the newrelic.ini (last time I used New Relic you could just download it from newrelic.com).

BTW, 49% of Python developers use Windows. I tried to link to the survey results that show it, but this web site won’t let me.


#4

Hey @pablo.fernandez1,

I am the product manager for the Python Agent and I appreciate your feedback! I took a look at the JetBrains survey you referenced and acknowledge the need for us to better serve the Python community developing in Windows.

While I can’t promise we’ll prioritize making the config generator work in Windows right away, this is something we’re aware of and will factor into our roadmap.

Best


#5

I personally got it to work by commenting out the requirement of pwd and hardcoding the single use of pwd, so, this bug shouldn’t be too hard to fix. I don’t have any urgency, just letting you know so you can have more information regarding estimating effort.


#6

Thanks for sharing your fix here @pablo.fernandez1 - I’m sure @kchu and the Python team will take that on board :smiley: