Full error:
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'C:\Program Files\GDAL"'
Why is Python looking for the file C:\Program Files\GDAL" when I run the following?
python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
I even created a folder named GDAL in my C:/Program files folder, but it's still not working? Why in the world must uploading a package to PyPi be such a pain?!?
Ok, so I figured it out - turns out my PYTHONPATH variable was set to C:\Program Files\GDAL" for some unknown reason. I changed it to C:\Users\\Anaconda3 and now it works!
Related
I have created a python project in:
C:\Users\%USER%\AppData\Roaming\LibreOffice\4\user\Scripts\python\propertyManager
I tried to create the project with:
venv:
C:\Users%USER%\AppData\Roaming\LibreOffice\4\user\Scripts\python\propertyManager\venv-w
interpreter:
C:\Program Files\LibreOffice\program\python.exe
but I get an error:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Program Files\\LibreOffice\\program\\python-core-3.8.16\\bin\\pythonw.exe'
I am trying to use different versions of Python on my Windows pc and I'm getting this error when using pip:
Fatal error in launcher: Unable to create process using '"c:\users\mypc\appdata\local\programs\python\python38\python.exe" "C:\Python38\Scripts\pip.exe" ': The system cannot find the file specified.
I understand that this might mean there's two PATH to each of those locations so it's confused, but c:\users\mypc\appdata\local\programs\python\python38\python.exe doesn't even exist on my computer nor in my PATH.
Output of where python is:
C:\Python38\python.exe`
Here is the PATH in readable format
C:\Program Files\Intel\WiFi\bin\
C:\Program Files\Common Files\Intel\WirelessCommon\
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\WINDOWS\System32\WindowsPowerShell\v1.0\
C:\WINDOWS\System32\OpenSSH\
C:\Program Files\nodejs\
C:\Program Files\Git\cmd
C:\Program Files\wkhtmltopdf
C:\Program Files\Docker\Docker\resources\bin
C:\ProgramData\DockerDesktop\version-bin
C:\Python38\Scripts
C:\Python38\
"C:\Users\mypc\AppData\Local\Microsoft\WindowsApps
C:\bin"
C:\Program Files\Intel\WiFi\bin\
C:\Program Files\Common Files\Intel\WirelessCommon\
C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.2.1\bin
C:\Program Files (x86)\Nmap
C:\Users\mypc\AppData\Local\Microsoft\WindowsApps
C:\Users\mypc\AppData\Local\Programs\Microsoft VS Code\bin
C:\Users\mypc\AppData\Roaming\npm
C:\Users\mypc\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\
C:\Program Files\wkhtmltopdf
C:\ProgramData\mypc\atom\bin
C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.3\bin
C:\Program Files\MongoDB\Server\4.2\bin
it seems like python team may have implemented some security measures.
The new method now is just to prefix python -m before your commands.
Let's say you are trying to install pygame (any package) with pip. For that, you'll use
python -m pip install pygame //Or any package name
Also, upgrading pip and all other commands will also use the same command structure:
python -m pip install --upgrade pip
When you go to Environment Variables there's 2 PATH's. One at the top and one under System variables. Deleting all references to python in the System variables PATH fixed the issue for me. You can then use pip as normal again
I was trying to install flask in my Ubuntu 18.04 virtual machine in order to implement an API which send emails.
I following this tutorial:
https://runnable.com/docker/python/dockerize-your-flask-application
when trying to set the virtual environment, I got this error with these two commands:
- python3 -m venv venv
error :
Error: [Errno 30] Read-only file system: 'lib' -> '/shared/BerryCert/Agent/Flask_Web/venv/lib64'
- Virtualenv venv
error :
File "/usr/lib/python3.6/shutil.py", line 365, in copytree
raise Error(errors)
shutil.Error: [('/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6.so', '/shared/BerryCert/Agent/Flask_Web/venv/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6.so', "[Errno 30] Read-only file system: '../../x86_64-linux-gnu/libpython3.6m.so.1' -> '/shared/BerryCert/Agent/Flask_Web/venv/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6.so'"), ('/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.so', '/shared/BerryCert/Agent/Flask_Web/venv/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.so', "[Errno 30] Read-only file system: '../../x86_64-linux-gnu/libpython3.6m.so.1' -> '/shared/BerryCert/Agent/Flask_Web/venv/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.so'")]
Could you please explain the issue to me?
When creating the virtualenv, pass the --always-copy flag.
So something like: virtualenv --always-copy [your-environment].
This should copy environment files - not symlink them. There are sometimes issues with symlinks on virtualbox. Hope this helps!
I'm on Windows 10 and I've been trying to pip install mysql, but keep getting the error message:
error: command 'c1.exe' failed: No such file or directory
I have Microsoft VC 14 installed, at C:\Program Files (x86)\
For some reason when I installed python, it installed at C:\Users\name\AppData\Local\Programs\Python\Python36
I've tried moving c1.exe into the python folder, but that didn't help.
Do I need to move the python folder somewhere else? Will that mess up python in any way? Is there an easier fix?
UPDATE: I changed the PATH variable, and it resolved this error. Then it moved on to a new error:
I changed the path, and it resolved the error. Then I got a new error, related to the execution of c1.exe it seems:
_mysql.c
_mysql.c(42): fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\x86_amd64\\c1.exe' failed with exit status 2`
you might have to add a python path variable or change it. see config noted here: How to add to the pythonpath in windows 7?
I'm trying to update setuptools using homebrew but I keep getting an error that says:
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/setuptools-1.1.3-py2.7.egg'
How do I allow my computer to make changes to that file so I can update setuptools?
I figured out how to fix it! I looked up the name of that file setuptools-0.6c11-py2.7.egg and I found a python page on it that says
NOTE: Regardless of what sort of Python you're using, if you've previously installed older versions of setuptools, please delete all setuptools*.egg and setuptools.pth files from your system's site-packages directory (and any other sys.path directories) FIRST.
So I deleted setuptools-0.6c11-py2.7.egg and setuptools.pth in /Library/Python/2.7/site-packages/ then I went into terminal and typed in pip install --upgrade setuptools and it worked!
Open Finder and select Go - Go To Folder. Then hit Command-I, and at the bottom under Sharing and Permissions, add yourself with Read and Write Access. This should solve it.